import type { ITableConfig } from '@/components/table/type'

import { getGoodsList } from '@/service/goods/goods'
const goodsTableConfig: ITableConfig = {
  tableColumns: [
    {
      prop: 'name',
      label: '商品名称'
    },
    {
      prop: 'oldPrice',
      label: '原价格',
      width: '100px'
    },
    {
      prop: 'newPrice',
      label: '现价格',
      width: '100px'
    },
    {
      prop: 'imgUrl',
      label: '图片',
      width: '100px',
      slotName: 'image'
    },
    {
      prop: 'status',
      label: '状态',
      width: '100px',
      slotName: 'status'
    },
    {
      prop: 'createAt',
      label: '创建时间',
      slotName: 'createAt'
    },
    {
      prop: 'updateAt',
      label: '更新时间',
      slotName: 'updateAt'
    },
    {
      label: '操作',
      slotName: 'handler'
    }
  ],
  showIndexColumn: true,
  showSelectColumn: true,
  getData: getGoodsList
}

export { goodsTableConfig }
